1. Field of the Invention
The present invention relates to a multi-tenant architecture. More particularly, the present invention relates to a method and system for determining resource usage of each tenant in a multi-tenant architecture.
2. Description of Related Art
Soft as a Service (SaaS) is an emerging software delivery model. Different from the traditional software delivery model, SaaS provides services on line, which frees users from installation, upgrading and maintenance, and enables users to access via the Internet anytime and anywhere. In addition, compared with traditional software delivery models, users can enjoy good services with low monthly payments.
The SaaS application is typically based on a multi-tenant architecture. FIGS. 1a to 1e schematically show several kinds of multi-tenant architecture in the process of multi-tenant architecture development.
FIG. 1(a) shows a block diagram of level-1 multi-tenant architecture, wherein different tenants exclusively occupy different instances, each instance being customized to one tenant. However, since each instance serving each tenant is unique, the operation cost of service providers is huge. FIG. 1 (b) shows a block diagram of a level-2 multi-tenant architecture, wherein instances serving different tenants are identical. However, it is wasteful or each tenant to be provided exclusively with a same instance when the application scale is not very large. Therefore, in a level-3 multi-tenant architecture, as shown in FIG. 1 (c), different tenants share a same instance. However, if the number of tenants increases, it will be necessary to balance the load, thus the level-3 multi-tenant architecture can not satisfy the service requirement. To this end, in a level-4 multi-tenant architecture, as shown in FIG. 1 (d), a tenant load balancer is used to prioritize the processing of service requests based on tenants' priorities, so as to realize load balance.
With further expansion of the application scale, the level-4 multi-tenant architecture can not satisfy the increasing tenant's demands any more. There is also a level-5 multi-tenant architecture. As shown in FIG. 1 (e), in the level-5 multi-tenant architecture, multiple tenants share a plurality of same instances under the management of a tenant load balancer. The tenant load balancer may allocate tenants' service requests to each instance based on the computing capacity, load of the device where each instance resides and/or the priorities of tenants, such that services are provided to the tenants by each instance. In the level-5 multi-tenant architecture, a logic storage is provided for multiple instances to share, so as to store data required to share by multiple instances.
In a multi-tenant architecture, billing is an important issue. In the level-5 multi-tenant architecture, two billing manners are often adopted. One is a fixed monthly rental, i.e. charging the same price for all tenants subscribing to the services. Although resource usages of different tenants vary, under this billing manner, all tenants are charged with the same payment, thus it is a manner that is simple but unfair. Another manner is to charge by time, which reflects fairness to a certain extent, but the basis for billing is the on-line time of a tenant. Besides, services provided by a service provider contain a large number of functions, but the functions needed by each tenant are different. In addition, the operation times of each tenant regarding the same function usually are different, and even the resources consumed by operations of the same function are also different. Therefore, a fairer billing manner is to bill based on the resource usage of each tenant. However, it is impossible to obtain the resource usage of each tenant according to the prior art.